public class Student {
    //成员变量
    String firstName;
    String lastName;

    //构造函数
    public Student() {

    }
    //构造函数和方法一样能复写
    public Student(String firstName, String lastName) {
        //this指向对象本身
        this.firstName = firstName;
        this.lastName = lastName;
    }

    //成员方法
    public void printName(){
        System.out.println("hello");
    }
}
